<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/views/common/include/taglib.jsp"%>
	
	<script src="${ctx}/js/controllers/system/log/LogListController.js" type="text/javascript"></script>
	<script type="text/javascript">
		var ctx = '${ctx}';
		
		setCtx(ctx);
	</script>
            <section>
              <div style="height:40px;line-height: 40px;">
                    <div class="forword_area"></div>
					<div class="location">当前位置：${sessionScope.currcent_position}</div>

              </div>
              <hr>
              <section>
                <!--begin 搜索栏 -->
                  <div class="panel">
	                  <div  style="float:left;height: 28px;">
	                    <input id="beginDate" type="text" maxlength="6" class="input-sm" onClick="WdatePicker({maxDate:'2099-12-31 23:59:59'})" value="${beginDate}" placeholder="起始时间">
	                  	<input id="endDate" type="text" maxlength="20"  class="input-sm" onClick="WdatePicker({maxDate:'2099-12-31 23:59:59'})" 
	                  	style=" margin-left: 12px;" value="${endDate}" placeholder="结束时间">
	                  	<input id="userName" type="text" maxlength="20" value="${(not empty userName)? userName : '' }" class="input-sm" 
	                  	style=" margin-left: 12px;"value="${userName}" placeholder="用户名">
	                  	</div>
						<div class="btn-group">
							<select class="dropdown-menu" id="pSize">
								<c:forEach items="${pageSizes }" var="item">
									<option value="${item.value }"
										<c:if test="${pSize == item.value }">selected</c:if>>&nbsp;&nbsp;&nbsp;${item.label }</option>
								</c:forEach>
							</select>
						</div>
			             <div class="form-control">
			               <div id="social-buttons" style="margin-bottom: 0px;">
			                 <div class="search" onclick="logList();" style="float:left;"><img src="${ctx }/images/table/search_second.png"></div>
			               </div>
			             </div>
                </div><!--end 搜索栏 -->

                <!--begin table表格 -->
                <div>
                <table class="table">
                    <thead>
                      <tr>
                        <!-- <th width="5%"><label class="checkbox m-n i-checks"><input type="checkbox" name="allCheckBox"><i></i></label></th> -->
                        <th width="5%">序号</th>
                        <th width="10%">用户名</th>
                        <th width="15%">用户类型</th>
                        <th width="15%">操作IP</th>
                        <th width="15%">操作时间</th>
                        <th width="10%">浏览器</th>
                        <th width="15%">操作类型</th>
                      </tr>
                    </thead>
                    <tbody id="tableTbody">
                      	<c:forEach items="${logList.list }" var="item" varStatus="itemStatus">
	                      <tr onmouseover="mouseoverOne(this)" onmouseout="mouseoutOne(this)">
	                        <!-- <td><label class="checkbox"><input type="checkbox" name="post[]"><i></i></label></td> -->
	                        <td>${itemStatus.index + 1 }</td>
	                        <td>${item.userName}</td>
	                        <td>
	                        <c:if test="${item.operateType == '0'}">
	                                                                           平台
	                        </c:if>
	                        <c:if test="${item.operateType == '1'}">
	                                                                            运维
	                        </c:if>
	                        <c:if test="${item.operateType == '2'}">
                                                                                         物业
                            </c:if>
                            <c:if test="${item.operateType == '3'}">
                                                                                          商家
                            </c:if>
                            <c:if test="${item.operateType == '4'}">
                                                                                        配送
                            </c:if>
                            <c:if test="${item.operateType == '5'}">
                                                                                          业主
                            </c:if>
	                        </td>
	                        <td>${item.ip}</td>
	                        <td>${item.operatetime}</td>
	                        <td>${item.browser}</td>
	                        <td>${item.logcontent}</td>
	                      </tr>
                      	</c:forEach>
                    </tbody>               
                                      
                    <tfoot>
		            	<tr>
			               <td colspan="7">
			                  <div>
			                  <input id="pages" type="hidden" value="${logList.pages}">
			                    <div style="float:left;">
			                      <span class="total">合计 ${logList.total} 条数据</span>               
			                    </div>
			                    <div style="float:right;  margin-right: 10px;margin-top: 29px"> 
				                    <div style="float:left;">                
				                      <ul class="footer_ul">
				                      	<c:if test="${logList.hasPreviousPage }">
				                        <li onclick="gotoPage(${currentPage-1 });"><a style="color:#37CED4">&lt;&lt;</a></li>
				                      	</c:if>
				                      	
				                      	<c:if test="${logList.firstPage > 1}">
				                        	<li onclick="gotoPage(1);" style="border: 1px solid #9A9A9A;">
				                             	<a>1</a>
				                        	</li>
				                        	<c:if test="${logList.firstPage > 2}">
				                        		...
				                        	</c:if>
				                      	</c:if>
				                        <c:forEach items="${logList.navigatepageNums }" var="page">
				                        <li onclick="gotoPage(${page });" class="<c:if test="${currentPage == page }">active</c:if>" style="border: 1px solid #9A9A9A;">
				                             <a>${page}</a>
				                        </li>
				                        </c:forEach>
				                        <c:if test="${logList.lastPage < logList.pages}">
				                        	<c:if test="${logList.firstPage < logList.pages - 1}">
				                        		...
				                        	</c:if>
				                        	<li onclick="gotoPage(${logList.pages});" style="border: 1px solid #9A9A9A;">
				                             	<a>${logList.pages}</a>
				                        	</li>
				                      	</c:if>
				                        
				                        <c:if test="${logList.hasNextPage }">
				                        <li><a onclick="gotoPage(${currentPage+1});" style="color:#37CED4">&gt;&gt;</a></li>
				                      	</c:if>
				                      </ul>
				                   	</div>
			                   	    <div style="float:left;  height: 30px;">
										<span style="color: #9A9A9A;">跳转到</span> 
										<input class="inputclass" id="pageNo" onkeydown="if(event.keyCode==13){event.keyCode=0;return false;}" type="text" value="${currentPage }" style="width:26px;height:28px"onkeyup = "checInputNum(this)">
										<span style="color: #9A9A9A;">页</span> 
										<span class="buttonclass" id="J_JumpTo" onclick="gotoLogPage(null);"><a>GO</a></span>
									</div>
			                 </div>
			                 </div>
						</td>
					</tr>
				</tfoot>
                </table>
                </div>
              </section>
            </section>
   <%@include file="/views/common/footer.jsp"%>
   
   <!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
